import scrapy
from scrapy.http import HtmlResponse
from comicsScrapy.items import DmItem
from . import dmSpider

# 定义 hanime1 3D動畫爬虫程式, scrapy crawl d3Spider -o d3.csv
class D3spiderSpider(dmSpider.DmspiderSpider):
    name = "d3Spider"
    allowed_domains = ["hanime1.me"]

    debug_mode = False
    run_mode = "" # "<<TEST>>"
    title = "3D動畫"
    topic_name = "3D"
    start_url = 'https://hanime1.me/search?genre=3D動畫'
    list_selector = 'div.search-doujin-videos > a'
    image_selector = 'div.card-mobile-panel > div > img:nth-last-child(1)::attr(src)'

    # 静态指定爬虫页面（二选一）
    #start_urls = ['https://hanime1.me/search?genre=3D動畫&page=1']

